{% extends 'base.html' %}
{% block title %}LogDetail{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{url_for('static',filename='css/log_detail.css')}}" />
<link rel="stylesheet" href="{{url_for('static',filename='css/font-awesome.min.css')}}" />
{% endblock %}
{% block js %}
<script src="{{url_for('static',filename='js/log_detail.js')}}"></script>
<script type="text/javascript" src="../static/libs/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../static/libs/echarts.min.js"></script>
{% endblock %}
{% block rightcontext %}
<table width="100%" class="tab" id="myTab" style="top:10px;border-color: #e3e3e3;" frame=void>
    <tr style="border-bottom:1px solid #e3e3e3;">
        <th>id</th>
        <th>ip</th>
        <th>登录邮箱</th>
        <th>登录时间</th>
    </tr>
    {% for log in logs %}
    <tr style="border-bottom:1px solid #e3e3e3;">
        <td>{{log.id}}</td>
        <td>{{log.ip}}</td>
        <td>{{log.email}}</td>
        <td>{{log.date}}</td>
        <!-- <hr> -->
    </tr>
    {% endfor %}
    <table frame=void class="page-number" style="position: absolute;top:1200px;background-color: #f8f8ff;width:600px;">
        <tr>
            <td class="td" style="white-space: nowrap;">当前页数: {{paginate.page}}</td>
            <td class="td">总页数: {{paginate.pages}}</td>
            <td class="td">共有 {{paginate.total}} 条数据</td>
            <td class="td">
                页码：
                {% for i in paginate.iter_pages() %}
                <a href="{{url_for('log_detail',page=i)}}"
                    style="border:#d3d3d3 solid 1px;padding:2px 5px;border-radius:2px;">{{ i }}</a>
                {% endfor %}</td>
            {% if paginate.has_prev %}
            <td class="td" style="margin-right:20px;">
                <a href="{{url_for('log_detail',page=paginate.prev_num)}}"
                    style="border:#d3d3d3 solid 1px;padding:5px 7px;border-radius: 4px;">上一页</a>
                {% endif %}</td>

            <td class="td" style="margin-right:20px;">
                {% if paginate.has_next %}
                <a href="{{url_for('log_detail',page=paginate.next_num)}}"
                    style="border:#d3d3d3 solid 1px;padding:5px 7px;border-radius: 4px;">下一页</a>
                {% endif %}</td>
        </tr>
    </table>
</table>
{% endblock %}